FROM node
COPY ./ /home
WORKDIR /home
RUN npm config set registry https://registry.npm.taobao.org/ && npm install react-scripts && npm run build

FROM node
COPY --from=0 /home/build /home/www
WORKDIR /home/www
RUN npm config set registry https://registry.npm.taobao.org/ && npm install -g serve
EXPOSE 5000
